ostbuild: Stop generating git mirror config
authorColin Walters <walters@verbum.org>
Thu, 8 Mar 2012 13:41:32 +0000 (08:41 -0500)
committerColin Walters <walters@verbum.org>
Tue, 13 Mar 2012 14:39:31 +0000 (10:39 -0400)
Nothing's using it right now and it's a little buggy.

src/ostbuild/pyostbuild/builtin_resolve.py

index 67fbd2c2e36aab58bebbfa6f8209ea4f69e73f04..3f4b566f62fb8eeb2c1d267e3b95b1d89f928805 100755 (executable)
@@ -193,27 +193,6 @@ class OstbuildResolve(builtins.Builtin):
         del self.manifest['vcsconfig']
         del self.manifest['patches']
 
-        mirror_gitconfig_path = os.path.join(self.mirrordir, 'gitconfig')
-        git_mirrordir = os.path.join(self.mirrordir, 'git')
-        f = open(mirror_gitconfig_path, 'w')
-        find_proc = subprocess.Popen(['find', '-type', 'f', '-name', 'HEAD'],
-                                     cwd=git_mirrordir, stdout=subprocess.PIPE)
-        path_to_url_re = re.compile(r'^([^/]+)/([^/]+)/(.+)$')
-        for line in find_proc.stdout:
-            assert line.startswith('./')
-            path = line[2:-6]
-            f.write('[url "')
-            f.write('file://' + os.path.join(git_mirrordir, path) + '/')
-            f.write('"]\n')
-            f.write('   insteadOf = ')
-            match = path_to_url_re.match(path)
-            assert match is not None
-            url = urlparse.urlunparse([match.group(1), match.group(2), match.group(3),
-                                       None, None, None])
-            f.write(url)
-            f.write('/\n')
-        print "Generated git mirror config: %s" % (mirror_gitconfig_path, )
-
         manifest_architectures = self.manifest['architectures']
         del self.manifest['architectures']
         for architecture in manifest_architectures: